<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2D转换之旋转</title>
    <style>
        img {
            width: 150px;
            /* 顺时针旋转45度 */
            /* transform: rotate(45deg); */
            /* 逆时针旋转45度 */
            /* transform: rotate(-45deg); */

            border-radius: 50%;
            border: 5px solid pink;

            /* 过渡写在本身上,谁做动画给谁加 */
            transition: all 0.6s;
        }

        img:hover{
            transform: rotate(360deg);
        }
    </style>
</head>
<body>
    <img src="media/pic.jpg" alt="">
</body>
</html>